/*
 * Buzzer.cpp
 *
 *  Created on: 2021��5��10��
 *      Author: sunjipeng
 */
#include "Buzzer.h"

void Buzzer::init() {
	pinMode(this->buzzer_pin, OUTPUT);
}

void Buzzer::beep() {
	digitalWrite(this->buzzer_pin, HIGH);
	//
	this->buzzing = true;
}

void Buzzer::stop() {
	digitalWrite(this->buzzer_pin, LOW);
	this->buzzing = false;
}

bool Buzzer::isBuzzing() {
	return this->buzzing;
}
